﻿<%@ Page Title="" Language="C#" Theme = "DetailsView" MasterPageFile="~/Students.master" AutoEventWireup="true" CodeFile="SRepairs.aspx.cs" Inherits="SRepairs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:DetailsView 
         ID = "dtlRepairs"
         DataSourceID = "srcRepairsUnfinish"
         SkinID = "Colorful"
         AutoGenerateRows = "false"
         HeaderText = "报修单"         
         AutoGenerateInsertButton = "true"
         DefaultMode = "Insert"
         runat = "server" >
         <Fields>
         <asp:BoundField 
             DataField = "id"
             HeaderText = "编号" />
         <asp:BoundField 
             DataField = "sname"
             HeaderText = "姓名" />
         <asp:BoundField 
             DataField = "b_n"
             HeaderText = "楼房" />
         <asp:BoundField 
             DataField = "d_n"
             HeaderText = "宿舍号" />
         <asp:BoundField 
             DataField = "repairstime"
             HeaderText = "报修时间" />
         <asp:BoundField 
             DataField = "thingsname"
             HeaderText = "报修物品" />        
         </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource 
         ID = "srcRepairsUnfinish"
         ConnectionString = "<%$ConnectionStrings:Dormitory %>"
         InsertCommand = "insert repairs( id,sname,b_n,d_n,thingsname,repairstime)
            values(@id,@sname,@b_n,@d_n,@thingsname,@repairstime)"
         runat = "server" ></asp:SqlDataSource>
</asp:Content>

